home *** CD-ROM | disk | FTP | other *** search
- /COPYING_INFO
- (
- Created by Convert PICT a PICT to eps converter.
- Copyright (C) 1993 David John Burrowes
- The following PS routines are distributed under terms of GNU General Public License.
- See any copy of the GPL for more info. E.g. in COPYING in Convert PICT's online help.
- )
- def
- %BEGIN Common
- /penWidth 1 def
- /penHeight 1 def
- /lastTop 0 def
- /lastLeft 0 def
- /lastBottom 0 def
- /lastRight 0 def
- /foregroundColor [0 0 0] def
- /backgroundColor [1 1 1] def
- /backPattern 20 dict def
- backPattern begin
- /QDPatType 0 def
- /QDPatData <FFFFFFFFFFFFFFFF> def % white
- /QDPatGrey 1 def
- end
- /penPattern 20 dict def
- penPattern begin
- /QDPatType 0 def
- /QDPatData <0000000000000000> def
- /QDPatGrey 0 def
- end
- /fillPattern 20 dict def
- fillPattern begin
- /QDPatType 0 def
- /QDPatData <0000000000000000> def % black
- /QDPatGrey 1 def
- end
- /patternMode /patCopy def
- /PSlevel
- systemdict /languagelevel known
- {languagelevel}
- {1}
- ifelse
- def
- /usePattern
- {
- /QDPatternDict exch def
- /patternType QDPatternDict /QDPatType get def
- patternType 2 eq
- { QDPatternDict /QDColorValue get useColor }
- {
- PSlevel 1 eq
- {
- /patGrey QDPatternDict /QDPatGrey get def
- /invGrey 1 patGrey sub def
- 0 1 2
- {
- /index exch def
- foregroundColor index get invGrey mul
- backgroundColor index get patGrey mul add
- }
- for
- setrgbcolor
- }
- {
- patternType 0 eq
- {
- /PSPatDict 15 dict def
- PSPatDict begin
- /PaintType 1 def
- /PatternType 1 def
- /TilingType 1 def
- /BBox [0 0 8 8] def
- /XStep 8 def
- /YStep 8 def
- /myData QDPatternDict /QDPatData get def
- /PaintProc {
- begin
- patternMode /patBic eq
- patternMode /notPatCopy eq
- or
- { 0 1 2 { backgroundColor exch get } for }
- { 0 1 2 { foregroundColor exch get } for }
- ifelse
- setrgbcolor
- 8 8 false
- [1 0 0 1 0 0]
- myData
- imagemask
- patternMode /notPatOr eq
- patternMode /notPatCopy eq
- or
- { 0 1 2 { foregroundColor exch get } for }
- { 0 1 2 { backgroundColor exch get } for }
- ifelse
- setrgbcolor
- 8 8 true
- [1 0 0 1 0 0]
- myData
- imagemask
- end
- } def
- end
- PSPatDict matrix makepattern setpattern
- }
- {
- /PSPatDict 20 dict def
- PSPatDict begin
- /PaintType 1 def
- /PatternType 1 def
- /TilingType 1 def
- /BBox [0 0 QDPatternDict /QDDestWidth get
- QDPatternDict /QDDestHeight get] def
- /XStep QDPatternDict /QDDestWidth get def
- /YStep QDPatternDict /QDDestHeight get def
- /ImageType 1 def
- /Width QDPatternDict /Width get def
- /Height QDPatternDict /Height get def
- /BitsPerComponent
- QDPatternDict /BitsPerComponent get def
- /Decode [ 0 2 BitsPerComponent exp 1 sub ] def
- /ImageMatrix [1 0 0 1 0 0] def
- /DataSource QDPatternDict /QDPatBitmap get def
- /PaintProc {
- /ourDict exch def
- [/Indexed /DeviceRGB
- QDPatternDict /QDNumColors get
- QDPatternDict /QDColorTable get]
- setcolorspace
- ourDict image
- } def
- end
- PSPatDict matrix makepattern setpattern
- }
- ifelse
- }
- ifelse
- }
- ifelse
- }
- def
- /useColor
- {
- /colorArray exch def
- colorArray 0 get
- colorArray 1 get
- colorArray 2 get
- setrgbcolor
- }
- def
- /setupForArcPath
- {
- /ovalLeft exch def
- /ovalBottom exch def
- /ovalHeight exch def
- /ovalWidth exch def
-
- ovalHeight 0 le
- ovalWidth 0 le
- or
- { 0 0 0 } % if height or with <= 0, return center 0,0 radius 0
- {
- ovalWidth ovalHeight gt
- {
- 1 ovalHeight ovalWidth div scale
- ovalLeft ovalWidth 2 div add % X coordinate center
- ovalBottom ovalHeight 2 div sub ovalWidth ovalHeight div mul
- ovalWidth 2 div % radius
- }
- {
- ovalWidth ovalHeight div 1 scale
- ovalLeft ovalWidth 2 div add ovalHeight ovalWidth div mul
- ovalBottom ovalHeight 2 div sub % Y coord center
- ovalHeight 2 div % radius
- }
- ifelse
- }
- ifelse
- }
- def
- /regionBounds
- {
- /right exch def
- /bottom exch def
- /left exch def
- /top exch def
- newpath
- left top moveto
- right top lineto
- right bottom lineto
- left bottom lineto
- closepath
- }
- def
- /regionPath
- {
- /numShapes exch def
- newpath
- numShapes
- {
- /numPoints exch def
- /y exch def
- /x exch def
- x y moveto
- numPoints 1 sub
- {
- /y exch def
- /x exch def
- x y lineto
- }
- repeat
- closepath
- }
- repeat
- }
- def
- /startPict
- {pop}
- def
- /QDclip
- {
- initclip
- regionBounds
- clip
- /numShapes exch def
- numShapes 0 gt
- {
- numShapes
- regionPath
- clip
- }
- if
- }
- def
- /endPict
- {}
- def
- /headerOp
- {pop}
- def
- %END Common
-